<%@ page import="dao.impl.Studentimpl" %>
<%@ page import="entity.JavaBean" %>
<%@ page import="java.util.List" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"   %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<script type="text/css">
    #enen{
        width: 200px;
        height: 200px;
        background-color: aquamarine;
        position: fixed;
        top: 0px;
        left: 0px;
        right: 0px;
        bottom: 0px;
        margin: auto;

    }

</script>
<%
    Studentimpl studentimpl = new Studentimpl();
    List<JavaBean> allStudent = studentimpl.getAllStudent();
    pageContext.setAttribute("student",allStudent);
%>
    <div id="enen" >
    <c:forEach items="${student}" var="student" varStatus="stu">
        <table border="1" width="100" style="height: 20px">
            <tr
                    <c:if test="${stu.count%2==0}"> style="background-color: cornflowerblue"

                    </c:if>
            >
                <td><a href="index.jsp">${student.sid}</a></td>
                <td>${student.sname}</td>
                <td>${student.sage}</td>
                <td>${student.saddress}</td>
                <td>${student.sgender}</td>
                <td>${student.semail}</td>
            </tr>
        </table>
    </c:forEach>
</div>

</body>
</html>
